<script src="/assets/index/js/jquery-3.3.1.min.js"></script>
<script src="/assets/index/js/bootstrap.min.js"></script>
<script src="/assets/lib/layer/layer.js"></script>
<script>
    $('#loginout').click(function () {
        $.ajax({
            url:"{{url('loginout')}}",
            type:'post',
            dataType:'json',
            success:function (data) {
                layer.msg(data.msg, {
                    icon:6,
                    time:2000
                }, function () {
                    location.reload();
                });
            }
        });
        return false;
    });
</script>